Don't use the return value from SendMessage(WM_SETICON). That is the old
authorTor Lillqvist <tml@iki.fi>
Sun, 7 Dec 2003 11:03:08 +0000 (11:03 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sun, 7 Dec 2003 11:03:08 +0000 (11:03 +0000)
2003-12-07  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
return value from SendMessage(WM_SETICON). That is the old
icon. Fixes GDI resource leak. (#128559, Tim Evans)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/win32/gdkwindow-win32.c

index 4c520c1ece2c181f4c10fdca853dea62aa2b479a..79f22690d854c3a840b906af40f56e17acaa3fdd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2003-12-07  Tor Lillqvist  <tml@iki.fi>
 
+       * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
+       return value from SendMessage(WM_SETICON). That is the old
+       icon. Fixes GDI resource leak. (#128559, Tim Evans)
+
        * gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
        have a pointer grab active with a grab cursor set, destroy that
        cursor to avoid a GDI resource leak. (#128410, Tim Evans)
index 4c520c1ece2c181f4c10fdca853dea62aa2b479a..79f22690d854c3a840b906af40f56e17acaa3fdd 100644 (file)
@@ -1,5 +1,9 @@
 2003-12-07  Tor Lillqvist  <tml@iki.fi>
 
+       * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
+       return value from SendMessage(WM_SETICON). That is the old
+       icon. Fixes GDI resource leak. (#128559, Tim Evans)
+
        * gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
        have a pointer grab active with a grab cursor set, destroy that
        cursor to avoid a GDI resource leak. (#128410, Tim Evans)
index 4c520c1ece2c181f4c10fdca853dea62aa2b479a..79f22690d854c3a840b906af40f56e17acaa3fdd 100644 (file)
@@ -1,5 +1,9 @@
 2003-12-07  Tor Lillqvist  <tml@iki.fi>
 
+       * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
+       return value from SendMessage(WM_SETICON). That is the old
+       icon. Fixes GDI resource leak. (#128559, Tim Evans)
+
        * gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
        have a pointer grab active with a grab cursor set, destroy that
        cursor to avoid a GDI resource leak. (#128410, Tim Evans)
index 4c520c1ece2c181f4c10fdca853dea62aa2b479a..79f22690d854c3a840b906af40f56e17acaa3fdd 100644 (file)
@@ -1,5 +1,9 @@
 2003-12-07  Tor Lillqvist  <tml@iki.fi>
 
+       * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
+       return value from SendMessage(WM_SETICON). That is the old
+       icon. Fixes GDI resource leak. (#128559, Tim Evans)
+
        * gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
        have a pointer grab active with a grab cursor set, destroy that
        cursor to avoid a GDI resource leak. (#128410, Tim Evans)
index 4c520c1ece2c181f4c10fdca853dea62aa2b479a..79f22690d854c3a840b906af40f56e17acaa3fdd 100644 (file)
@@ -1,5 +1,9 @@
 2003-12-07  Tor Lillqvist  <tml@iki.fi>
 
+       * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
+       return value from SendMessage(WM_SETICON). That is the old
+       icon. Fixes GDI resource leak. (#128559, Tim Evans)
+
        * gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
        have a pointer grab active with a grab cursor set, destroy that
        cursor to avoid a GDI resource leak. (#128410, Tim Evans)
index e2b7d629a2cc46504699274c07f6714a3e7c773f..640eaccf3ebabd5b4e44e1773f357b983122daec 100644 (file)
@@ -2249,7 +2249,7 @@ gdk_window_set_icon (GdkWindow *window,
       }
 #endif
 
-      hIcon = (HICON)SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, (LPARAM)hIcon);
+      SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, (LPARAM)hIcon);
       if (impl->hicon)
         GDI_CALL (DestroyIcon, (impl->hicon));
       impl->hicon = hIcon;
@@ -2259,7 +2259,7 @@ gdk_window_set_icon (GdkWindow *window,
       /* reseting to default icon */
       if (impl->hicon)
         {
-          hIcon = (HICON)SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, 0);
+          SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, 0);
           GDI_CALL (DestroyIcon, (impl->hicon));
           impl->hicon = NULL;
         }